#ifndef SQLREPORTVIEW_H
#define SQLREPORTVIEW_H

#include <QTableView>

class SqlReportView : public QTableView
{
    Q_OBJECT
public:
    explicit SqlReportView(QWidget *parent = 0);

signals:
    void viewReports(const QModelIndexList &indexes);
    void exportReports(const QModelIndexList &indexes);
    void removeReports(const QModelIndexList &indexes);

public slots:
    void onViewReports() { emit viewReports(selectedIndexes()); }
    void onExportReports() { emit exportReports(selectedIndexes()); }
    void onRemoveReports();

protected:
    void contextMenuEvent(QContextMenuEvent *e);

private:
    void setupContextMenu();
    QMenu *contextMenu;

    QAction *viewReportAction;
    QAction *exportReportAction;
    QAction *removeReportAction;
};

#endif // SQLREPORTVIEW_H
